<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分页</title>
</head>
<body>
 <h1>图书列表</h1>
    {% for book in page.object_list %}
    <p>
        <b>{{forloop.counter}}</b>
        .{{book}}
    </p>
    {% endfor %}
    <br>
    {% for page_num in paginator.page_range %}
        {% if page.number == page_num %}
            {{page_num}}
        {% else %}
            <a href="/book/?page_num={{ page_num }}">{{page_num}}</a>
        {% endif %}
    {% endfor %}

</body>
</html>